import os

from flask import Flask

def create_app():
    my_app = Flask(__name__)
    my_app.config.from_object('config.settings')

    if "FlASK_CONE" in os.environ:
        my_app.config.from_envvar("FLASK_CONE")

    ctx = my_app.app_context()
    ctx.push()

    import router
    router.init_app(my_app)

    return my_app


